<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 属性选择器 */
        /* 含有title属性就生效 */
        [title] {
            color: aqua;
        }
        /* 只有title属性值为div的才生效 */
        [title=div] {
            background-color: antiquewhite;
        }
    </style>
</head>
<body>
    <!-- 含有属性title -->
    <div title="h2">我是div1</div>
    <div title="div">我是div2</div>
    <div id="home">我是div3</div>
</body>
</html>